﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Adams.Public.Web.Controllers
{
    public class ClassifiedsController : Controller
    {
        [AppendLayoutViewModel]
        public ActionResult Index()
        {
            var model = Business.Web.Classifieds.Index.PageLoad();
            return View(model);
        }

        [AppendLayoutViewModel]
        public ActionResult List(string type, string category)
        {
            var model = Business.Web.Classifieds.List.PageLoad(type, category);
            return View(model);
        }

        [AppendLayoutViewModel]
        public ActionResult Search(string criteria)
        {
            var model = Business.Web.Classifieds.Search.PageLoad(criteria);
            return View(model);
        }

        [AppendLayoutViewModel]
        public ActionResult Posting(string id)
        {
            var model = Business.Web.Classifieds.Posting.PageLoad(id.ToInt());
            return View(model);
        }
    }
}
